package com.photoeditor.demo.db;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;

import java.io.Serializable;

/**
 * Created by winn on 17/4/13.
 */
@Entity
public class FilterCategoryBean implements Serializable {

    /** 0~BUILDIN_CATEGORY_ID_MAX以内id为内置分类 **/
    public static final int BUILDIN_CATEGORY_ID_MAX = 4000;

    private static final long serialVersionUID = 1L;

    @Id(autoincrement = true)
    private Long id;

    private String categoryId;

    private String name;

    /**
     * 1、内置
     * 2、more
     * 3、下载
     */
    private int type;

    private String story;

    private String author;

    private String authorUrl;

    private String banner;

    /** icon在包内的资源id **/
    private int iconResId;

    private String iconUrl;

    private String lastUpdate;

    /**
     * 分类展示类型，暂时就网格一种
     * 1：网格
     * 2：其他
     */
    private String style;

    /**
     * style为1时，取值2x2
     */
    private String additional;

    /** 分组是否可用 **/
    private boolean usable;

    /**
     * Local排序，上下拖动使用
     */
    private int localIndex;

    /**
     * 第一个滤镜id，用于显示分类图片
     */
    private String firstFilterId;

    private String pkgName;

    private Boolean isDownloadOnGP;

    @Transient
    private FilterBean selFilterBean;

    public FilterCategoryBean() {
    }

    public FilterCategoryBean(Long id, String categoryId, String name, int type,
                              String story, String author, String authorUrl, String banner,
                              int iconResId, String iconUrl, String lastUpdate, String style,
                              String additional, boolean usable, int localIndex) {
        this.id = id;
        this.categoryId = categoryId;
        this.name = name;
        this.type = type;
        this.story = story;
        this.author = author;
        this.authorUrl = authorUrl;
        this.banner = banner;
        this.iconResId = iconResId;
        this.iconUrl = iconUrl;
        this.lastUpdate = lastUpdate;
        this.style = style;
        this.additional = additional;
        this.usable = usable;
        this.localIndex = localIndex;
    }

    @Generated(hash = 1184464816)
    public FilterCategoryBean(Long id, String categoryId, String name, int type, String story,
            String author, String authorUrl, String banner, int iconResId, String iconUrl,
            String lastUpdate, String style, String additional, boolean usable,
            int localIndex, String firstFilterId, String pkgName, Boolean isDownloadOnGP) {
        this.id = id;
        this.categoryId = categoryId;
        this.name = name;
        this.type = type;
        this.story = story;
        this.author = author;
        this.authorUrl = authorUrl;
        this.banner = banner;
        this.iconResId = iconResId;
        this.iconUrl = iconUrl;
        this.lastUpdate = lastUpdate;
        this.style = style;
        this.additional = additional;
        this.usable = usable;
        this.localIndex = localIndex;
        this.firstFilterId = firstFilterId;
        this.pkgName = pkgName;
        this.isDownloadOnGP = isDownloadOnGP;
    }

    public FilterBean getSelFilterBean() {
        return selFilterBean;
    }

    public void setSelFilterBean(FilterBean bean) {
        selFilterBean = bean;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCategoryId() {
        return this.categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIconResId() {
        return this.iconResId;
    }

    public void setIconResId(int iconResId) {
        this.iconResId = iconResId;
    }

    public String getIconUrl() {
        return this.iconUrl;
    }

    public void setIconUrl(String iconUrl) {
        this.iconUrl = iconUrl;
    }

    public boolean getUsable() {
        return this.usable;
    }

    public void setUsable(boolean usable) {
        this.usable = usable;
    }

    public int getLocalIndex() {
        return this.localIndex;
    }

    public void setLocalIndex(int localIndex) {
        this.localIndex = localIndex;
    }

    public String getStory() {
        return this.story;
    }

    public void setStory(String story) {
        this.story = story;
    }

    public String getAuthor() {
        return this.author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getAuthorUrl() {
        return this.authorUrl;
    }

    public void setAuthorUrl(String authorUrl) {
        this.authorUrl = authorUrl;
    }

    public String getBanner() {
        return this.banner;
    }

    public void setBanner(String banner) {
        this.banner = banner;
    }

    public String getLastUpdate() {
        return this.lastUpdate;
    }

    public void setLastUpdate(String lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

    public String getStyle() {
        return this.style;
    }

    public void setStyle(String style) {
        this.style = style;
    }

    public String getAdditional() {
        return this.additional;
    }

    public void setAdditional(String additional) {
        this.additional = additional;
    }

    public int getType() {
        return this.type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getFirstFilterId() {
        return this.firstFilterId;
    }

    public void setFirstFilterId(String firstFilterId) {
        this.firstFilterId = firstFilterId;
    }

    public String getPkgName() {
        return pkgName;
    }

    public void setPkgName(String pkgName) {
        this.pkgName = pkgName;
    }

    public boolean isDownloadOnGP() {
        return isDownloadOnGP == null ? false:isDownloadOnGP;
    }

    public void setDownloadOnGP(boolean downloadOnGP) {
        isDownloadOnGP = downloadOnGP;
    }

    public Boolean getIsDownloadOnGP() {
        return this.isDownloadOnGP;
    }

    public void setIsDownloadOnGP(Boolean isDownloadOnGP) {
        this.isDownloadOnGP = isDownloadOnGP;
    }
}